home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / c / mcmm.exe / MCS_MENU.H < prev    next >
C/C++ Source or Header  |  1992-10-02  |  6KB  |  194 lines

  1. /***********************************************/
  2. /*                                             */
  3. /*       Header File for MCs Menu Maker        */
  4. /*                                             */
  5. /***********************************************/
  6.  
  7.  
  8.  
  9. /***********************************************/
  10. /*                                             */
  11. /* Define BIOS and ASCII key definitions       */
  12. /*                                             */
  13. /***********************************************/
  14.  
  15. #define UP 72
  16. #define DOWN 80
  17. #define RIGHT 77
  18. #define LEFT 75
  19. #define RETURN 28
  20. #define ESCAPE 1
  21. #define TAB 15
  22. #define ASCIIESCAPE 27
  23. #define ASCIITAB 9
  24. #define ASCIIDEL 83
  25. #define ASCIIBACK 8
  26. #define ASCIIRETURN 13
  27. #define NULL 0L
  28.  
  29.  
  30. /***********************************************/
  31. /*                                             */
  32. /* Define function prototypes                  */
  33. /*                                             */
  34. /***********************************************/
  35.  
  36. void screen_setup(void);
  37. void menu_heading(void);
  38. void menu_clear(int);
  39. void menu_display(int);
  40. int menu_poll(void);
  41. void menu_declare(char *);
  42. void menu_right(void);
  43. void menu_left(void);
  44. void menu_down(void);
  45. void menu_up(void);
  46. void menu_move(void);
  47. void menu_bar_highlight(int);
  48. int menu_selection_plot(int,int);
  49. int menu_action(void);
  50. void menu_error(int);
  51. void menu_attrib_type(char *);
  52. void window_declare(char *,int,int,int,int,char *);
  53. void window_display(int,int,int);
  54. int window_info(int,int *);
  55. void win_item_text(int,char unsigned*,int,int,int *,char *);
  56. void win_item_switch(int,char unsigned*,int,int,int *,int);
  57. void win_set_item(int,int,int long);
  58. int win_storage(int);
  59. int window_item_update(int);
  60. int win_do_text(int,int *);
  61. int win_do_switch(int,int *,int);
  62. void win_do_number(int,int,int);
  63. void win_item_number(int,char unsigned*,int,int,int *,int);
  64. void win_item_boolean(int,char unsigned*,int,int,int *,int);
  65. void win_item_file(int,char unsigned*,int,int,int *,int,int);
  66. int win_do_file(int,int *,int);
  67. int long win_get_item(int,int);
  68. void fastprint(int,char unsigned *,int,int,char unsigned,char unsigned);
  69. void win_plot_rect(int,char unsigned *,int,int);
  70. void win_item_char(int,char unsigned*,int,int,int *,char *,int,int);
  71. int win_do_char(int,int *,int);
  72. void stringprint(int,char unsigned*,int,int,char *,char unsigned);
  73. void win_item_accept(int,char unsigned*,int,int,int *,char *,int);
  74. int win_do_accept(int,int *,int);
  75. void win_icon_shadow(int,char unsigned*,int,int);
  76. int window_show(int,int,int);
  77. void window_help_display(int,int);
  78. void window_help_declare(int,int,char *);
  79. void menu_help_display(int,int);
  80. void menu_help_declare(int,int,char *);
  81. void win_refresh();
  82. int error_handler(int,int,int,int);
  83. void menu_kill(void);
  84.  
  85.  
  86. /***********************************************/
  87. /*                                             */
  88. /* The menu definition structure               */
  89. /*                                             */
  90. /***********************************************/
  91.  
  92. struct menu_def {
  93. char *menu_options;
  94. char *menu_pic;
  95. int menu_x;
  96. int menu_height;
  97. int menu_width;
  98. int menu_highlight;
  99. char menu_links[23];
  100. struct menu_def *next;
  101. };
  102. extern struct menu_def *start;
  103. extern struct menu_def *end;
  104.  
  105.  
  106. struct menu_help_def {
  107. char *help_string;
  108. int number;
  109. int item;
  110. struct menu_help_def *next;
  111. };
  112. extern struct menu_help_def *startmh;
  113. extern struct menu_help_def *endmh;
  114.  
  115.  
  116. struct window_help_def {
  117. char *help_string;
  118. int number;
  119. int item;
  120. struct window_help_def *next;
  121. };
  122. extern struct window_help_def *startwh;
  123. extern struct window_help_def *endwh;
  124.  
  125.  
  126.  
  127. /***********************************************/
  128. /*                                             */
  129. /* The window definition structure             */
  130. /*                                             */
  131. /***********************************************/
  132.  
  133. struct window_def {
  134. char *window_pic;
  135. int window_x;
  136. int window_y;
  137. int window_xoff;
  138. int window_yoff;
  139. char *window_info;
  140. char *window_storage;
  141. struct window_def *next;
  142. };
  143. extern struct window_def *startw;
  144. extern struct window_def *endw;
  145.  
  146.  
  147. /***********************************************/
  148. /*                                             */
  149. /* Global variables                            */
  150. /*                                             */
  151. /***********************************************/
  152.  
  153. extern int menu_position;             // returned value for menu selected
  154.  
  155. extern int menu_option;               // returned value for menu option selected
  156.  
  157. extern int menu_fore_color;           // menu/window foreground color
  158.  
  159. extern int menu_back_color;           // menu/window background color
  160.  
  161. extern int menu_highlight_color;      // menu/window highlight color
  162.  
  163. extern char menu_buffer1[4096];       // buffer to save screen behind menu
  164.  
  165. extern char menu_buffer2[4096];       // buffer to save screen behind window
  166.  
  167. extern int menu_titles;               // Used to check the number of titles
  168.  
  169. extern char *menu_bar_options;        // The menu bar option headings
  170.  
  171. extern int menu_menus;                // Used to check the number of menus
  172.  
  173. extern int window_windows;            // Used to check the number of windows
  174.  
  175. extern int window_x;              // X offset for displayed window                
  176.  
  177. extern int window_y;                  // Y offset for displayed window
  178.  
  179. extern int win_attr;                  // Used to hold the windows main color
  180.  
  181. extern int win_out;                   // Used to get us out of the menu system
  182.  
  183. extern char unsigned far *win_text_screen; // Contains the text screen address
  184.  
  185. extern int window_open;               // Number of open window
  186.  
  187. extern int window_item;               // Number of selected window item
  188.  
  189. extern int menu_help_color;           // Colour for help text
  190.  
  191. extern int win_accept;                // Currently active window
  192.  
  193. extern int win_default;               // If 1 a gadget reads from its workspace
  194.